1. Field of the Invention
The present invention relates to a series of computer software programs that act as intelligent agents on a computer system, such as a digital computer network, for receiving instructions, obtaining information related to the instructions, and making decisions based upon the information obtained.
2. Description of the Related Art
1. Development Tools
Software programming has evolved significantly since its inception during World War II. At first, computers were programmed in a sequential series of instructions to perform a single task. This sequential type of programming was pervasive until the middle 1980's. Eventually, programs that performed multiple tasks based upon user input were created. The interface to control these tasks based execution upon events that were issued by the user. Software development tools quickly shifted to the new paradigm and ushered in event-driven software. Event driven software tends to be more "modular" than sequential programming. This modularity was later extended by the computer science discipline from "structured programming" to "object-oriented programming."
Object-oriented programming (OOP) lies at the heart of most modern programming languages. SmallTalk, C++, Delphi, and Java are OOP programming languages. For a general discussion of OOP technology, see Gary Entsminger, The Tao of Objects: A Beginner's Guide to Object-Oriented Programming (Second Edition), M&T Books, New York, N.Y., 1995; and David A. Taylor, Object-Oriented Systems Design: An Integrated Approach, Yourdon Press/PTR Prentice Hall, Englewood Cliffs, N.J., 1994.
There are specific terms of art in the field of object-oriented programming. One of ordinary skill in the art would be cognizant of the differences of the definitions presented herein and the definitions for the same term as used at some future date. The primary terms of art for OOP are: Class, Object, Instantiation, Instance Variable, Member Function (Method), Property, Subclassing, Ancestor Class, Parent Class, and Descendent Class.
A class or class definition is the fundamental structure in the OOP discipline. The class determines what the defined data element and code routines will be for all objects created from that class. The class also defines the scope of those elements, determining which code routines will be for external methods, and which data variables will be properties. The class is not an object itself. It merely defines how to build an object, and what that object's capabilities will be once it is created.
An object is an actual entity that is created at runtime and resides in active program memory. An object is created from a class definition. The class definition determines what methods and properties the object has. The class definition can also define the initial values for the object's properties. Once an object is created, it no longer refers back to the class from which it was created. Thus, any runtime changes made to an object have no effect whatsoever on any other object created from the same class.
Instantiation is the name given to the process of creating an in-memory object from a class definition. This process creates an instance of the class--hence the name. An instance of a class is also referred to as an object of the class' type.
A data element associated with an object is known as an instance variable. Although all objects within a particular class will have variables defined with the same names, each object will have separate memory storage for each of these variables. Thus, each instance of the class has its own copy of each instance variable.
A member function (called a method in Delphi) are publicly available procedures and functions of a class. The word public signifies that one object can invoke another object's member function. An object can contain private member functions and variables for internal use that are hidden from other objects.
A property is a special kind of instance variable. Typically, a property is paired with a private (or protected) instance variable upon which the class' code routines actually operate. The property is used to control how data is retrieved from or written to the private instance variable.
The process of creating a child class definition through inheritance from a parent class is called subclassing. Subclassing only has meaning in the context of the data elements and code routines inherited from the parent class. The child class thus created will have additional properties and member functions defined, or will redefine one or more of the parent's member functions (via polymorphism), or both.
An ancestor class is a class from which data and code definitions are inherited. This ancestor class may not be the immediate parent from which a child class was defined. The parent class may be higher up the inheritance hierarchy.
A parent class is the immediate ancestor class from which data and code definitions are inherited to create a new child class definition.
Any class that has been defined based upon inheritance from another class is known as a descendant class of that ancestor. The terms child class and descendant class are usually used interchangeably. A more strict definition of descendant class would be any class that inherits from an ancestor that may or may not be the immediate child of that ancestor. Parent and child classes describe immediate inheritance relationships, whereas ancestor and descendant classes are their more general corollaries.
There are three fundamental concepts that are the foundation of object-oriented programming: Encapsulation, Inheritance, and Polymorphism. The idea behind encapsulation is that data structures and code routines that manipulate the data structures are bound together (encapsulated), into a single entity called an object. An object-oriented software programs can contain one or more objects. One object, as well as the program's main code can access pre-selected data (called properties) within an object, or issue commands to objects in order to perform some procedure or function (called member functions). All access to the object's internal data structures and code routines must go through the object's interface. This structure allows one object to "hide" some or all of its data from another object in order to keep the code or data from being publicly available. This ability of an object to hide its data, and even its code, is a crucial feature of encapsulation. Most programming errors (bugs) arise from the need for code re-entrance (the need to execute the same code from within multiple application contexts) and data access concurrence (the need to be able to have multiple pieces of code use the same data variables at the same time). Encapsulation, by its very nature, eliminates these types of programming errors.
The second fundamental object-oriented concept is inheritance. Just like biological inheritance, OOP inheritance allows a programmer to create child object definitions, called child classes, that inherit the methods and data structures of the parent class. One benefit of inheritance is that you can create a child class and then use the inherited methods and properties from the parent class without having to recreate them from scratch. You then code only the differences between the parent and child classes. This process is known as programming by exception. This enables the programmer to concentrate on creating those methods and properties that are unique to the child class. An additional benefit of inheritance is that it affords easier maintainability. Inheritance provides a mechanism that permits programmers to make a change in the parent class knowing that the effect will ripple throughout all of the child classes automatically. Inheritance gives programmers a choice when confronted with a programming task. They can either create a custom object, or inherit from an existing (thoroughly debugged) object and then program the differences. The latter technique is know as subclassing.
The last fundamental concept of object-oriented programming is polymorphism. All programming languages allow the programmer to create a set of publicly available functions (known as external methods) for each object. These external methods make up the objects "application program interface" (API). Polymorphism adds the ability to use the same method name to perform vastly different operations, based upon the type of object that is being referenced by the method. Because of polymorphism, a programmer can simply tell an object to perform a particular method without being concerned with any internal differences from one type of object to the next. The object is left with the details to work out on its own. One last aspect of polymorphism is a concept called method overloading wherein a method with a single name will perform similar functions for two different objects. For example, two child classes, called "Dog" and "Kangaroo" can be created as descendants from the "Animal" class. One of the characteristics of all animals is that they run from a threat. This characteristic is promulgated in the member function "Run." The Dog object and the Kangaroo object, as descendants from the Animal class, both have a member function called Run. However, dog's don't run the way kangaroos "run." Consequently, a programmer making a Kangaroo object will modify the Animal class' Run member function accordingly. This is a great benefit to other software developers. If a developer is using a Dog object, he merely invokes the "Run" member function (written as Dog.Run) in order to make the evade a threat. Similarly, the (modified) "Run" method for the Kangaroo object (written as Kangaroo.Run) would cause the kangaroo to hop on its hind legs in order to evade the threat. The programmer would not need to know that kangaroos "hop" instead of"run." Those details are left to the developer of the Kangaroo class. With method overloading, the developer would only need to know that, to make anything descended from the Animal class evade a threat, he merely needs to call its Run member function.
2. The Internet PA1 3. Sockets PA1 4. Robots and Java
The Internet, known metaphorically as the "information superhighway," is a world-wide computer network. The Internet performs a wide variety of services and can act as a transport medium for an even wider variety of digital information in the form of electrical signals. The flexibility of the Internet to act as a transport medium for digital information has fueled the unique explosion of innovation and growth that is associated with the Internet. The source of that flexibility is the client/server model. This model divides application programs into two parts: the client program, with which the user interacts, and the server program, which coordinates activities with multiple clients. In the most simple case, these two programs can run on the same computer. More commonly, clients and servers are separate hosts that are connected via a local area network (LAN) or the Internet. A Personal Computer (PC) is commonly used as a client host. Mainframe computers or specially designed file/database servers commonly act as serving hosts. Using this methodology, the software application can run and be effective regardless of the hardware's physical location.
One of the fundamental issues regarding a network that implements a client/server method is addressing. If the server cannot be located, the data cannot be retrieved. Fortunately, all networks can handle the addressing issue by using a protocol common throughout the network. In the case of the Internet, the protocol is the Internet Protocol (IP). Every host connected to the Internet has a unique 32-bit identifier called an IP address. The IP address is divided into four eight-bit values, or octets. A binary representation of the bits comprising an octet are, for example, 01001010, which is equivalent to decimal 73. Each octet is subdivided into high order bits and low order bits. In the previous example, the high order bits would be the four leftmost (or 0100). The low order bits in the previous example would be the four rightmost (or 1010). The value of the IP address is usually written in dotted decimal notation of each octet, such as "73.999.123.1," with the first octet taking the leftmost position. For example, the network address 128.1.2.3 translates to 10000000.00000001.00000010.00000011 in binary.
The high-order bits of the first octet have special significance: They divide the IP address into five classes: A, B, C, D, and E. Depending upon the class of address, a certain number of bits are used to identify networks, and the remainder are used to identify specific hosts. For example, in a Class A address, the first high order bit of the first octet is always 0. The next seven bits in a Class A address identify the network, and the last 24 bits identify the host on the network. Consequently, Class A addresses are used primarily by very large organizations.
If the first two bits are 10, then it is a Class B address. The first two bits indicate the class, the next 14 bits constitute the network address, and the last 16 bits signify the specific host. Class B addresses are among the most common Internet addresses. Class B addresses are used by corporations, universities, and Internet Service Providers (ISP).
When a user is first connected to the Internet, the ISP usually assigns an unused IP address (for a host) to the user. If the user connects to a local area network (LAN) that is attached to the Internet, the network administrator might assign addresses manually, or use the Dynamic Host Configuration Protocol (DHCP) to assign addresses automatically, from a block of addresses reserved by the ISP. IP addresses solve only the problem of uniquely identifying a host and its network. The low-level Internet protocol relies on the IP address to transport information between hosts on the network.
In short, the Internet protocol is the foundation of the Internet. IP defines the datagram that is the fundamental transmission unit of the Internet. IP specifies the addressing scheme and handles the routing of the datagrams within the Internet. Finally, IP provides the best effort delivery of data, the fragmentation (breaking data streams into smaller pieces), and reassembly of the fragmented data on the receiving end. However, IP does not deal with the specific format of the data that constitutes the communications between hosts on the network. That duty is handled by other protocols that are addressed below.
Once IP addresses are known, communications can commence between hosts on the network. Communications between client/server applications are, by necessity, founded on common specifications agreed upon in advance. These specifications are known as protocols. Most Internet protocol specifications are recorded in RFC (Request for Comment) documents. If Internet users think that an RFC has sufficient merit, it will be widely implemented. An example is RFC 959, more commonly known as the File Transfer Protocol (FTP). Almost any data communications network transmits data in small chunks, usually referred to as packets or datagrams. A datagram is simply a specific number of bytes that are grouped together and sent at one time. Networks break continuous data streams into smaller datagrams in order to share resources, handle errors, and isolate failures. How datagrams are sent and received depends upon the protocol used. The Internet, like any network, is based upon protocol layers, commonly assembled into a protocol stack. The Open System Interconnect (OSI) Reference Model is an architectural model that provides a common reference for discussing communication layers and stacks.
Internet working requires different services from various hardware and software components. One layer can gather related functions, thereby reducing a large number of responsibilities to a smaller number of layers. A layer might be implemented in hardware (such as a modem) or in software (such as an operating system). Arguably, the most widely used protocol stack on the Internet is the Transmission Control Protocol/Internet Protocol (TCP/IP). TCP/IP provides a specific stack of layers that enable software applications to access standard Internet services.
TCP/IP's architecture consists of four layers. The lowest layer is the network access layer that specifies the physical link and delivers data across the specified link. Next is the Internet layer that defines datagrams and routes data through the network. The third layer is the transport layer that provides error detection and correction throughout the network path. Finally, the topmost layer is the application layer that consists of application programs that use the network. Networks build datagrams by passing the data (from the application layer) down through the other layers, each of which encapsulates the data and adds its own header. The header contains control information to ensure proper delivery of the datagram. This procedure is reversed at the receiving end, as each layer strips is respective header before passing data to the layer above.
Each layer has its own data structures and is unaware of the data structures used in the layers above or below it. TCP does not directly interact with IP, and IP does not directly manipulate the low-level structures of the transport medium (such as Ethernet). The data transferred from application to application does not have any headers and is thus seen as a continuous stream of information. The open design of the protocol specification gives Internet applications independence from the method used to carry data, and thus enables a wide variety of clients to access a standard server. Additional protocols are used to format the data that constitutes the communication between applications.
Software programs that use a common specification (protocol) for communication can interoperate. Even though the programs are from different software developers, they can all exchange messages with each other so long as the data obeys the agreed-upon protocol. Client programs using different computers and operating systems can also connect to the same server, so long as both the client and server programs use the same protocol. Other important communications protocols are used within the gambit of TCP/IP. The major Internet communication protocols include: Simple Mail Transfer Protocol (SMTP) and Post Office Protocol (POP) for electronic mail;
Network News Transport Protocol (NNTP) for Usenet Newsgroups; and the Hypertext Transfer Protocol (HTTP) for the World Wide Web.
IP addressing identifies hosts on the Internet. TCP/IP conversations support data communications across the Internet. One of the best features of this architecture is the sharing of resources so that many messages may be transmitted simultaneously across the Internet. However, in some instances, data from several sources, such as a web page and electronic mail, may reach the same host at the same time. Something must be done to sort or direct various data that arrive at the host simultaneously. TCP/IP solves this problem by using protocol numbers and port numbers to combine data from multiple processes, ship it over the Internet, and then split the incoming data apart at the client. Well-known ports provide the consistency needed for a client program to access the appropriate program on the server. Because the sender and receiver agree in advance which services are offered on which ports, software developers can use well-known ports to facilitate the connection process. Given the unique combination of an IP address and a TCP port number, a client application can establish communication with the exact server process required.
The unique combination of an IP address and a TCP port number is called a socket. For example, port 37 on host 192.5.41.41 is a socket that uniquely defines the TIME service on the U.S. Directorate of Time's time server. 192.5.41.41 is the TCP/IP address of the United States Directorate of Time's server computer, and port 37 is the service port of the TIME service or function. All systems that offer the TIME service offer it on port 37.
In addition to well-known and reserved ports, there are dynamically allocated ports. As their name implies, these ports are assigned on demand. The TCP/IP software tracks the ports that are in use in order to ensure that two processes do not have the same port number. Client applications that are connecting to a server application (usually on another computer) often use dynamically allocated ports. The client application does not need to use a specific port because the client applications are not trying to find it and connect to it. Dynamically allocated ports enable client computer systems to connect to multiple servers simultaneously. The client merely needs to allocate a specific port for communications with the specific server.
A socket uniquely identifies a single network process within the entire Internet. However, a socket based on a well-known port handles only half of the conversation: the client to the server. For meaningful conversation to occur, the server must be capable of returning data to the client. This is accomplished by exchanging port numbers.
For example, a client application may randomly generate a source port, such as 3049. The client would then send a segment with that source port and a destination port, such as 80 (the well-known HTTP port). TCP/IP then splits the segment across multiple datagrams and sends them across the Internet. Next, the receiving host reassembles the datagrams into a segment and passes it to the web server. In response, the web server builds a TCP segment, using 80 as the segment's source port and 3049 as its destination port. The sever then splits the segment into datagrams and sends them to the client.
Although the World Wide Web (the "Web") is arguably the most powerful service on the Internet, most of its power comes from the data transported through the Web, not from the Hypertext Transfer Protocol that supports it. The Web supports the client/server method very well, with "web servers" retaining documents for access by client programs such as a web browser that ask the web server to transmit a copy of the requested document. A web browser is an example of a server-to-client program in that the server retains the data which is copied to the client upon request.
Prior art web browsers are almost exclusively manipulated by a user, who requests documents one-at-a-time. This searching/document request method has been automated in the form of a web robot. Most Internet robots automate the task of verifying Uniform Resource Locator (URL) links (that link one web page to another). Other web robots, often called web crawlers, are used for finding related documents among many web servers. Unlike a web browser, a web robot can be programmed to find web servers and the documents they contain automatically.
Recently, the utility of the web server has been extended by the delivery of application programs as well as document-styled data. The current state-of-the-art on the Web uses technologies like Java to deliver actual programs from the web server to the client web browser. The client then runs the Java program (called an applet), thereby achieving a higher level of interaction with the user.
Java is a general-purpose, multi-threaded, object-oriented language, that is portable across a wide variety of operating systems and processor architectures. Java was initially developed to address the problems of building software for small distributed systems to embed in consumer devices. As such, it was designed for heterogenous networks, multiple host architectures, and secure delivery. To meet these requirements, Java code had to survive transport across a network, operate on any client, and assure the client that it was safe to run. The popularization of the World Wide Web helped to popularize Java's attributes.
Web documents are typically written in a special format for web browsers using the Hypertext Markup Language (HTML). HTML allows web documents to contain embedded URL's within the web page to establish links to other web pages. While HTML is useful for creating web pages, the format is considered too limited. The solution to the that problem was extend the capability of web pages written in HTML with Java programs.
Java programs are compiled into applets that can be embedded into web pages. The web pages are then viewed with a Java-enabled browser, such as HotJava, made by Sun Microsystems, Inc. The applets are transparently downloaded into the HotJava browser along with the HTML pages in which they appear. Java programs are compiled into a standard code. The Java code is then run on the Java-enabled browser on the client machine. Only the Java-enabled browser is made specifically for a particular operating system/microprocessor combination. To a large extent, Java is just another data type, like a web document. Any web server can serve Java applets, which the server handles the same as any other file. The special action happens when a Java-enabled web browser on the client machine interprets the applet class files and executes the applet.
Java is designed to support a distributed environment. It has a library of routines, called API (application program interfaces). One such API is called JAVA.NET, and is used for accessing such TCP/IP protocols as HTTP and FTP. Because Java integrates well with Web services, programmers can access objects across the Internet through Uniform Resource Locators (URL's) as easily as most languages enable programmers to access the local file system.
Java API's includes several class and member function libraries that developers can use to create multi-platform applications. These libraries include the following: JAVA.LANG (which includes the base types that are essential to any program); JAVA.IO (which supports file input/output and data streams); JAVA.NET (which provides for sockets, URL's and other interfaces); JAVA.UTIL (which supplies container and utility classes); and JAVA.AWT (which is a toolkit for making Java applications portable from one computer system to another (dissimilar) system).
Java is an extensible language, in that new types of objects can be created in Java. These custom objects can be constructed by software developers to do things that other, standard objects cannot. As with other OOP languages, member functions of Java objects can be inherited and modified to suit particular needs.
Although Java programs are useful, they are limited because they come from the server to the client. It would be useful to develop client-to-server programs that make more use of the client's capabilities which, in some cases, can rival that of the server. Unfortunately, the state-of-the-art does not support client-to-server programs or client-to-client programs that utilize information provided a server. There is, therefore, a need in the art for a client-to-server program and a client-to-client program. There is also a need in the art for client-to-server programs and client-to-client programs that run autonomously so that single-purpose programs can combine their functionality with other single-purpose programs and perform complex tasks. It is an object of the present invention to overcome the limitations of the prior art.